﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LevelEditor.App
{
    class ErrorController
    {
        public class LevelEditorError
        {
            public const string TILE_BIGGER = "The tile that you want to add is bigger than the current layer grid. " +
                        "Do you really want to add the tile ?";
            public const string TILE_SMALLER = "The tile that you want to add is smaller than the current layer grid. " +
                        "Do you really want to add the tile ?";

            public const string DB_CONNECTION = "An error has occurred trying to connect to the data base!";

            public const string DB_CONNECTION_BEHAVIOR_SAVE = "An error has occurred trying to save behavior!";

            public const string DB_CONNECTION_WBEHAVIOR_SAVE = "An error has occurred trying to save walk behavior!";

            public const string DB_CONNECTION_BEHAVIOR_UPDATE = "An error has occurred trying to update behavior!";

            public const string DB_CONNECTION_BEHAVIOR_DELETE = "An error has occurred trying to delete behavior!";

            public const string DB_CONNECTION_ALL_BEHAVIOR = "Failed to get all behaviors!";

            public const string DB_CONNECTION_ALL_WBEHAVIOR = "Failed to get all walk behaviors!";

            public const string DB_CONNECTION_BEHAVIOR = "Failed to get the behavior!";

            public const string DB_CONNECTION_WBEHAVIOR = "Failed to get walk behavior!";

            public const string DB_REQUEST_NOBEHAVIOR = "There are no behaviors! You need to create at least one to create the trigger.";

            public const string DB_EXISTS_BEHAVIOR = "This behavior already existis!";

            public const string DB_EXISTS_WBEHAVIOR = "This walk behavior already existis!";

            public const string APP_NO_SELECTED_BEHAVIOR = "There is no behavior selected. Please select at least one";

            public const string APP_NO_BEHAVIOR_NAME = "Insert a name for the behavior";

            public const string APP_CREATE_BEHAVIOR = "Error trying to create the behavior!";

            public const string APP_DELETE_BEHAVIOR = "Error trying to delete the behavior!";

            public const string APP_UPDATE_BEHAVIOR = "Error trying to update the behavior!";

            public const string DB_CONNECTION_TRIGGER_SAVE = "An error has occurred trying to save trigger!";

            public const string DB_CONNECTION_TRIGGER_UPDATE = "An error has occurred trying to update trigger!";

            public const string DB_CONNECTION_TRIGGER_DELETE = "An error has occurred trying to delete trigger!";

            public const string DB_CONNECTION_ALL_TRIGGER = "Failed to get all triggers!";

            public const string DB_CONNECTION_TRIGGER = "Failed to get the trigger!";

            public const string DB_EXISTS_TRIGGER = "This trigger already existis!";

            public const string APP_CREATE_TRIGGER = "Error trying to create the trigger!";

            public const string APP_DELETE_TRIGGER = "Error trying to delete the trigger!";

            public const string APP_UPDATE_TRIGGER = "Error trying to update the trigger!";

            public const string APP_NO_TRIGGER_NAME = "Insert a name for the trigger";

            public const string APP_NO_SELECTED_TRIGGER = "There is no trigger selected. Please select at least one";

            public const string DIRECTORY_OP = "Can't do directory operations. Try running as administrator";

            public const string APP_FILL_INFO = "Please, fill all the fields!";

            public const string APP_JUST_NUMBERS_PERMITED = "Just integer numbers are permited!";

            public const string APP_NO_FILE_TYPE_SELECTED = "Please, select a file type!";

            public const string APP_IMGSEQUENCE_INVALID = "Invalid image path";

            public const string APP_IMGSEQUENCE_LOAD = "Error trying to load image";

            public const string APP_IMGSHEET_LOAD = "Error trying to load sprite sheet";

            public const string APP_NO_IMAGE_SELECTED = "Select an image!";

            public const string APP_NO_COLLISION_DATA = "There is no collision data to save!";

            public const string APP_BEHAVIOR_NO_IMAGES = "The selected behavior doesnt have images!";
        }

        /// <summary>
        /// Show a YesNo option message box
        /// </summary>
        /// <param name="message">The error message</param>
        /// <returns></returns>
        public static DialogResult ShowYesNoError(string message)
        {
            return MessageBox.Show(message, "Error", MessageBoxButtons.YesNo);
        }

        /// <summary>
        /// Show a Ok message box
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public static DialogResult ShowOkError(string message)
        {
            return MessageBox.Show(message, "Error", MessageBoxButtons.OK);
        }

    }
}
